import { Navigate } from "react-router-dom";
import Home from "../pages/Home";
import CityList from "../pages/CityList";
import News from "../pages/News";
import PageHome from "../pages/HomePage";
import FindRoom from "../pages/FindRoom";
import Me from "../pages/Me";
import Search from "../pages/Search";
import Map from "../pages/Map";
import Test1 from "../pages/test1/index"

const routes = [
  {
    path: "/home",
    element: <Home />,
    children: [
      {
        path: "page",
        element: <PageHome />,
      },
      {
        path: "findroom",
        element: <FindRoom />,
      },
      {
        path: "news",
        element: <News />,
      },
      {
        path: "me",
        element: <Me />,
      },
    ],
  },
  {
    path: "/citylist",
    element: <CityList />,
  },
  {
    path: "/search",
    element: <Search />,
  },
  {
    path: "/map",
    element: <Map />,
  },
  {
    path: "/test1",
    element: <Test1 />,
  },
  {
    path: "/",
    element: <Navigate to="/home/page" />,
  },
  // {
  //   path: "*",
  //   element: <Navigate to="/home/page" />,
  // },
];

export default routes;
